package com.lin.eat.serivce;

import com.lin.eat.entry.Address;
import com.lin.eat.entry.Customer;
import com.lin.eat.entry.ServerResponse;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.util.List;

public interface CustomerService {

    //顾客注册
    ServerResponse<Customer> customerRegister(String c_id, String c_name, String c_phone, String c_password);

    //顾客登录
    ServerResponse<Customer> customerLogin(String c_phone, String c_password);

    //顾客退出登录
    ServerResponse<Customer> customerLogout(String c_token);

    //获取顾客信息
    ServerResponse<Customer> getCustomerInfo(String c_token);

    //顾客上传头像
    ServerResponse<Customer> updateHeadImage(MultipartFile file, String token) throws IOException;

    //更新用户名和性别
    ServerResponse<Customer> updateCustomerInfo(String c_name, int c_sex, String token);

    //添加地址
    ServerResponse addAddress(Address address, String token);

    //获取全部收货地址
    ServerResponse<List<Address>> getAllAddress(String token);

    //修改收货地址信息
    ServerResponse updateAddressInfo(Address address);

    //设置为默认地址
    ServerResponse updateAddressState(String ad_id);

    //删除地址
    ServerResponse deleteAddress(String ad_id);
}
